<template>
  <div style="line-height: 20px">
    <el-card class="box-card" style="height: 340px;overflow:auto">
      <div slot="header" class="clearfix">
        <span>诊断项目</span>
      </div>
      <div v-for="(basic,index) in $store.state.diagnosis['basic']">
        <el-divider  content-position="left">{{index+1}}.{{basic.name}}</el-divider>
<!--        用card，太难看，直接pass掉-->
<!--        <el-card class="box-card" v-for="(basic,index) in $store.state.diagnosis['basic']" v-if="basic.agreement.length !== 0">-->
<!--          <div class="analyseName clearfix" slot="header"><span>{{index+1}}.{{basic.name}}</span></div>-->
          <div style="text-align: left;margin-left: 40px">对此病证，您添加了{{basic.agreement.length}}个支持依据。<el-link type="primary" @click="open(basic)">查看详情</el-link></div>
<!--        </el-card>-->
      </div>
    </el-card>
    <br>
    <el-card class="box-card" style="height: 340px">
      <div slot="header" class="clearfix">
        <span>鉴别诊断项目</span>
      </div>
      <div v-for="(checked,index) in $store.state.diagnosis['checked']">
        <div>
          <el-divider  content-position="left">{{index+1}}.{{checked.name}}</el-divider>
          <div style="text-align: left;margin-left: 40px">对此病证，您添加了{{checked.agreement.length}}个支持依据和{{checked.disagreement.length}}个不支持依据。<el-link type="primary" @click="open(checked)">查看详情</el-link></div>
        </div>
      </div>
    </el-card>
  </div>
</template>

<script>
export default {
  name: "AnalysisResults",
  methods:{
    open(data) {
      this.$alert(JSON.stringify(data), '您的诊断', {
        confirmButtonText: '确定',
      });
    }
  }
}
</script>

<style scoped>
.analyseName{
  font-size: large;color: deepskyblue;text-align: left;font-weight: bold;
}
</style>
